{// 引入标签库 }
<tagLib name="html" />
<include file="Public:header" />
<script type="text/javascript">
	$(document).ready(function(){
		$("#typeSelect").bind("change",function(){
	
			$(".type").hide();
			$(".type_" + $(this).val()).show();

		});
	});

</script>
<div class="main">
<div class="main_title">{%ADD} <a href="{:u("MAdv/index")}" class="back_list">{%BACK_LIST}</a></div>
<div class="blank5"></div>
<form name="edit" action="__APP__" method="post" enctype="multipart/form-data">
<table class="form" cellpadding=0 cellspacing=0>
	<tr>
		<td colspan=2 class="topTd"></td>
	</tr>
	<tr>
		<td class="item_title">{%NAME}:</td>
		<td class="item_input">
			<input type="text" class="textbox require" name="name"  />
		</td>
	</tr>
	
	<tr>
		<td class="item_title">{%ADV_PAGE}:</td>
		<td class="item_input">
			<select name="page">
				<option value="index">{%MPAGE_INDEX}</option>
				<option value="sharelist">{%MPAGE_SHARELIST}</option>
			</select>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">{%ADV_IMAGE}:</td>
		<td class="item_input">
			<html:imgUpload name = 'img' id='img' />
			<span class='tip_span'>[{%ADV_PAGE_TIPS}]</span>
		</td>
	</tr>
	
	<tr>
		<td class="item_title">{%ADV_TYPE}:</td>
		<td class="item_input">
			<select name="type" id='typeSelect'>
				<option value="2">{%MTYPE_2}</option>
				<option value="5">{%MTYPE_5}</option>
				<option value="6">{%MTYPE_6}</option>
				<option value="11">{%MTYPE_11}</option>
				<option value="12">{%MTYPE_12}</option>
				<option value="13">{%MTYPE_13}</option>
				<option value="16">{%MTYPE_16}</option>
				<option value="17">{%MTYPE_17}</option>
				<option value="18">{%MTYPE_18}</option>
			</select>
		</td>
	</tr>
	
	<tr class="type_1 type">
		<td class="item_title">{%CATE_NAME}:</td>
		<td class="item_input">
			<select name="cid">
				<option value="0">{%NO_SELECT_CATE}</option>
				<foreach name="cate_list" item="cate_item">
					<option value="{$cate_item.id}">{$cate_item.name}</option>
				</foreach>
			</select>
		</td>
	</tr>
	
	<tr class="type_1 type">
		<td class="item_title">{%TAGS}:</td>
		<td class="item_input">
			<textarea class="textarea" name="tags" ></textarea>
			<span class='tip_span'>[{%ADV_TAGS_TIPS}]</span>
		</td>
	</tr>
	
	<tr class="type_2 type" style="display:none;">
		<td class="item_title">{%URL}:</td>
		<td class="item_input">
			<input type="text" class="textbox " name="url"  />
		</td>
	</tr>
	<tr class="type_8 type" style="display:none;">
		<td class="item_title">{%SHARE_ID}:</td>
		<td class="item_input">
			<input type="text" class="textbox " name="share_id"  />
		</td>
	</tr>
	<tr class="type_9 type_10 type_11 type_12 type_13 type" style="display:none;">
		<td class="item_title">分类ID:</td>
		<td class="item_input">
			<input type="text" class="textbox " name="cate_id"  />
		</td>
	</tr>
	
	<tr class="type_14 type_15 type_16 type_17 type_18 type" style="display:none;">
		<td class="item_title">数据ID:</td>
		<td class="item_input">
			<input type="text" class="textbox " name="data_id"  />
		</td>
	</tr>
	<tr>
		<td class="item_title">{%SORT}:</td>
		<td class="item_input">
			<input type="text" class="textbox " name="sort" value="{$new_sort}"  />
		</td>
	</tr>	
	<tr>
		<td class="item_title"></td>
		<td class="item_input">
			<!--隐藏元素-->
			<input type="hidden" name="{:conf("VAR_MODULE")}" value="MAdv" />
			<input type="hidden" name="{:conf("VAR_ACTION")}" value="insert" />
			<!--隐藏元素-->
			<input type="submit" class="button" value="{%ADD}" />
			<input type="reset" class="button" value="{%RESET}" />
		</td>
	</tr>
	<tr>
		<td colspan=2 class="bottomTd"></td>
	</tr>
</table>	 
</form>
</div>
<include file="Public:footer" />